package com.insta.java.model;

import java.io.Serializable;
import java.util.Date;

public class Location implements Serializable, ILocation{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3013528752148928079L;
	
	private Integer id;
	private User renter;
	private Date dateLocation;
	private Date dateReturn;
	private String bookISBN;
	
	public Location(){}
	
	public Location(User renter, String bookISBN) {
		super();
		this.renter = renter;
		this.dateLocation = new Date();
		this.bookISBN = bookISBN;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#getRenter()
	 */
	public User getRenter() {
		return renter;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#setRenter(com.insta.java.model.User)
	 */
	public void setRenter(User renter) {
		this.renter = renter;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#getDateLocation()
	 */
	public Date getDateLocation() {
		return dateLocation;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#setDateLocation(java.sql.Date)
	 */
	public void setDateLocation(Date dateLocation) {
		this.dateLocation = dateLocation;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#getDateReturn()
	 */
	public Date getDateReturn() {
		return dateReturn;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#setDateReturn(java.sql.Date)
	 */
	public void setDateReturn(Date dateReturn) {
		this.dateReturn = dateReturn;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#getBookISBN()
	 */
	public String getBookISBN() {
		return bookISBN;
	}

	/* (non-Javadoc)
	 * @see com.insta.java.model.ILocation#setBookISBN(java.lang.String)
	 */
	public void setBookISBN(String bookISBN) {
		this.bookISBN = bookISBN;
	}

	@Override
	public String toString() {
		return "Location [id=" + id + ", dateLocation=" + dateLocation
				+ ", dateReturn=" + dateReturn + ", bookISBN=" + bookISBN + "]";
	}
	
	
}
